Termination w.r.t. Q of the following Term Rewriting System could be proven:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
↳ QTRS
↳ DependencyPairsProof
Q restricted rewrite system:
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:
MARK(zprimes) → A__ZPRIMES
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X3)
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(nats(X)) → A__NATS(mark(X))
MARK(filter(X1, X2, X3)) → MARK(X2)
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(nats(X)) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
A__NATS(N) → MARK(N)
A__ZPRIMES → A__NATS(s(s(0)))
A__ZPRIMES → A__SIEVE(a__nats(s(s(0))))
MARK(sieve(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X1)
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ QDPOrderProof
Q DP problem:
The TRS P consists of the following rules:
MARK(zprimes) → A__ZPRIMES
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X3)
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(nats(X)) → A__NATS(mark(X))
MARK(filter(X1, X2, X3)) → MARK(X2)
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(nats(X)) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
A__NATS(N) → MARK(N)
A__ZPRIMES → A__NATS(s(s(0)))
A__ZPRIMES → A__SIEVE(a__nats(s(s(0))))
MARK(sieve(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X1)
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].
The following pairs can be oriented strictly and are deleted.
A__ZPRIMES → A__NATS(s(s(0)))
A__ZPRIMES → A__SIEVE(a__nats(s(s(0))))
The remaining pairs can at least be oriented weakly.
MARK(zprimes) → A__ZPRIMES
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X3)
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(nats(X)) → A__NATS(mark(X))
MARK(filter(X1, X2, X3)) → MARK(X2)
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(nats(X)) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
A__NATS(N) → MARK(N)
MARK(sieve(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X1)
Used ordering: Polynomial interpretation [25]:
POL(0) = 0
POL(A__FILTER(x1, x2, x3)) = x1
POL(A__NATS(x1)) = x1
POL(A__SIEVE(x1)) = x1
POL(A__ZPRIMES) = 1
POL(MARK(x1)) = x1
POL(a__filter(x1, x2, x3)) = x1 + x2 + x3
POL(a__nats(x1)) = x1
POL(a__sieve(x1)) = x1
POL(a__zprimes) = 1
POL(cons(x1, x2)) = x1
POL(filter(x1, x2, x3)) = x1 + x2 + x3
POL(mark(x1)) = x1
POL(nats(x1)) = x1
POL(s(x1)) = x1
POL(sieve(x1)) = x1
POL(zprimes) = 1
The following usable rules [17] were oriented:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
mark(zprimes) → a__zprimes
mark(nats(X)) → a__nats(mark(X))
mark(sieve(X)) → a__sieve(mark(X))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
mark(s(X)) → s(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__zprimes → zprimes
a__nats(X) → nats(X)
a__sieve(X) → sieve(X)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
MARK(zprimes) → A__ZPRIMES
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X3)
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(nats(X)) → A__NATS(mark(X))
MARK(filter(X1, X2, X3)) → MARK(X2)
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(nats(X)) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
A__NATS(N) → MARK(N)
MARK(sieve(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X1)
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
Q DP problem:
The TRS P consists of the following rules:
MARK(filter(X1, X2, X3)) → MARK(X3)
MARK(s(X)) → MARK(X)
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(nats(X)) → A__NATS(mark(X))
MARK(filter(X1, X2, X3)) → MARK(X2)
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(nats(X)) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
A__NATS(N) → MARK(N)
MARK(sieve(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X1)
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].
The following pairs can be oriented strictly and are deleted.
MARK(nats(X)) → MARK(X)
A__NATS(N) → MARK(N)
The remaining pairs can at least be oriented weakly.
MARK(filter(X1, X2, X3)) → MARK(X3)
MARK(s(X)) → MARK(X)
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(nats(X)) → A__NATS(mark(X))
MARK(filter(X1, X2, X3)) → MARK(X2)
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
MARK(sieve(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X1)
Used ordering: Polynomial interpretation [25]:
POL(0) = 0
POL(A__FILTER(x1, x2, x3)) = x1
POL(A__NATS(x1)) = 1 + x1
POL(A__SIEVE(x1)) = x1
POL(MARK(x1)) = x1
POL(a__filter(x1, x2, x3)) = x1 + x2 + x3
POL(a__nats(x1)) = 1 + x1
POL(a__sieve(x1)) = x1
POL(a__zprimes) = 1
POL(cons(x1, x2)) = x1
POL(filter(x1, x2, x3)) = x1 + x2 + x3
POL(mark(x1)) = x1
POL(nats(x1)) = 1 + x1
POL(s(x1)) = x1
POL(sieve(x1)) = x1
POL(zprimes) = 1
The following usable rules [17] were oriented:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
mark(zprimes) → a__zprimes
mark(nats(X)) → a__nats(mark(X))
mark(sieve(X)) → a__sieve(mark(X))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
mark(s(X)) → s(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__zprimes → zprimes
a__nats(X) → nats(X)
a__sieve(X) → sieve(X)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(nats(X)) → A__NATS(mark(X))
MARK(filter(X1, X2, X3)) → MARK(X2)
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X3)
MARK(sieve(X)) → A__SIEVE(mark(X))
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X1)
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
Q DP problem:
The TRS P consists of the following rules:
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(filter(X1, X2, X3)) → MARK(X2)
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X3)
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)
MARK(filter(X1, X2, X3)) → MARK(X1)
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].
The following pairs can be oriented strictly and are deleted.
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(filter(X1, X2, X3)) → MARK(X2)
MARK(filter(X1, X2, X3)) → MARK(X3)
MARK(filter(X1, X2, X3)) → MARK(X1)
The remaining pairs can at least be oriented weakly.
MARK(s(X)) → MARK(X)
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
M( cons(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( filter(x1, ..., x3) ) = | | + | | · | x1 | + | | · | x2 | + | | · | x3 |
M( a__filter(x1, ..., x3) ) = | | + | | · | x1 | + | | · | x2 | + | | · | x3 |
Tuple symbols:
M( A__FILTER(x1, ..., x3) ) = | 0 | + | | · | x1 | + | | · | x2 | + | | · | x3 |
M( A__SIEVE(x1) ) = | 0 | + | | · | x1 |
Matrix type:
We used a basic matrix type which is not further parametrizeable.
As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
mark(zprimes) → a__zprimes
mark(nats(X)) → a__nats(mark(X))
mark(sieve(X)) → a__sieve(mark(X))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
mark(s(X)) → s(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__zprimes → zprimes
a__nats(X) → nats(X)
a__sieve(X) → sieve(X)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(s(X)) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
Q DP problem:
The TRS P consists of the following rules:
MARK(s(X)) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].
The following pairs can be oriented strictly and are deleted.
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(sieve(X)) → MARK(X)
The remaining pairs can at least be oriented weakly.
MARK(s(X)) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
MARK(cons(X1, X2)) → MARK(X1)
Used ordering: Polynomial interpretation [25]:
POL(0) = 0
POL(A__SIEVE(x1)) = 1 + x1
POL(MARK(x1)) = x1
POL(a__filter(x1, x2, x3)) = x1 + x2
POL(a__nats(x1)) = x1
POL(a__sieve(x1)) = 1 + x1
POL(a__zprimes) = 1
POL(cons(x1, x2)) = x1
POL(filter(x1, x2, x3)) = x1 + x2
POL(mark(x1)) = x1
POL(nats(x1)) = x1
POL(s(x1)) = x1
POL(sieve(x1)) = 1 + x1
POL(zprimes) = 1
The following usable rules [17] were oriented:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
mark(zprimes) → a__zprimes
mark(nats(X)) → a__nats(mark(X))
mark(sieve(X)) → a__sieve(mark(X))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
mark(s(X)) → s(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__zprimes → zprimes
a__nats(X) → nats(X)
a__sieve(X) → sieve(X)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
MARK(s(X)) → MARK(X)
MARK(sieve(X)) → A__SIEVE(mark(X))
MARK(cons(X1, X2)) → MARK(X1)
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
Q DP problem:
The TRS P consists of the following rules:
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
The TRS R consists of the following rules:
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimes → a__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimes → zprimes
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- MARK(s(X)) → MARK(X)
The graph contains the following edges 1 > 1
- MARK(cons(X1, X2)) → MARK(X1)
The graph contains the following edges 1 > 1